package com.dc.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;

import java.io.Serializable;

@Data
// 表名
@Measurement(name = "message_log")
public class MessageLog implements Serializable {

    // 自带的时间
    @Column(name = "time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private String time;

    // 唯一id
    @Column(name = "batchId", tag = true)
    private String batchId;


    // JSON 数据
    @Column(name = "data")
    private String data;

    @Column(name = "deviceId", tag = true)
    private String deviceId;

    //建表的时候不需要建该字段
    @Column(name = "count_data")
    private String countData;


}
